/**
*      author: Y_Yao
*      created: 2025-04-27 20:02:43
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
string s;
string t;

void solve()
{
    cin >> s;
    cin >> t;
    for(int i = 0;i < s.size();i++)
    {
        int p1 = i;
        int p2 = 0;
        int st = 0;
        while((s[p1] == '?' || s[p1] == t[p2]) && p1 < s.size() && p2 < t.size())
        {
            st++;
            p1++,p2++;
        }
        if(st == t.size())
        {
            cout << "Yes" << endl;
            return;
        }
    }
    cout << "No" << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    // cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}